Package util
Class DukeApplicationTest
java.lang.Object
org.testfx.api.FxRobot
org.testfx.framework.junit5.ApplicationTest
util.DukeApplicationTest
- All Implemented Interfaces:
org.testfx.api.FxRobotInterface,org.testfx.framework.junit5.ApplicationFixture
- Direct Known Subclasses:
ViewTest
public class DukeApplicationTest
extends org.testfx.framework.junit5.ApplicationTest
This class acts as an intermediary between an OpenJFX application and TestFX.
It adds support for some extra UI components and employs a hack to work around an existing bug in
the current version to get them all to work properly.
- Author:
- Robert C. Duvall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidSimulate a click on any kind of buttonprotected voidSimulate a click within given GridPaneprotected voidSimulate a click within a non-button nodeprotected StringReturns message displayed in currently displayed DialogBoxprotected voidrunAsJFXAction(Runnable action) Run given view method as a JFX action, allowing you to add/remove components from the Scene or Stage.protected voidSimulate selecting given value from a ChoiceBoxprotected voidSimulate selecting given value from a ComboBoxprotected voidSimulate selecting given value from a ListViewstatic voidprotected voidsetValue(ColorPicker cp, Color value) Simulate setting a ColorPicker to given valueprotected voidSimulate setting a Slider to given valueprotected voidsimulateAction(double x, double y, Runnable action) protected voidsimulateAction(Node n, Runnable action) voidtearDown()protected voidwriteInputsToDialog(String... textInput) Simulate writing given text(s) within the fields of a DialogBoxprotected voidwriteInputTo(TextInputControl t, String text) Simulate typing given text in any text componentMethods inherited from class org.testfx.framework.junit5.ApplicationTest
getHostServices, getParameters, init, internalAfter, internalBefore, launch, notifyPreloader, start, stopMethods inherited from class org.testfx.api.FxRobot
bounds, bounds, bounds, bounds, bounds, bounds, bounds, bounds, bounds, capture, capture, capture, capture, capture, capture, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, closeCurrentWindow, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, drag, drag, drag, drag, drag, drag, drag, drag, drag, drag, drag, drop, dropBy, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, eraseText, from, from, from, fromAll, interact, interact, interactNoWait, interactNoWait, interrupt, interrupt, listTargetWindows, listWindows, lookup, lookup, lookup, moveBy, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, offset, offset, offset, offset, offset, offset, offset, offset, offset, point, point, point, point, point, point, point, point, point, press, press, push, push, release, release, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, robotContext, rootNode, rootNode, rootNode, scroll, scroll, scroll, scroll, scroll, sleep, sleep, targetPos, targetWindow, targetWindow, targetWindow, targetWindow, targetWindow, targetWindow, targetWindow, targetWindow, type, type, window, window, window, window, window, window, write, write, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testfx.api.FxRobotInterface
clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, moveBy, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, offset, offset, offset, offset, offset, offset, offset, offset, offset, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn
-
Constructor Details
-
DukeApplicationTest
public DukeApplicationTest()
-
-
Method Details
-
setUpClass
@BeforeAll public static void setUpClass() -
tearDown
- Throws:
Exception
-
clickOn
Simulate a click on any kind of button -
clickOn
Simulate a click within given GridPane -
clickOn
Simulate a click within a non-button node -
writeInputTo
Simulate typing given text in any text component -
writeInputsToDialog
Simulate writing given text(s) within the fields of a DialogBox -
setValue
Simulate setting a Slider to given value -
setValue
Simulate setting a ColorPicker to given value -
select
Simulate selecting given value from a ComboBox -
select
Simulate selecting given value from a ChoiceBox -
select
Simulate selecting given value from a ListView -
getDialogMessage
Returns message displayed in currently displayed DialogBox -
runAsJFXAction
Run given view method as a JFX action, allowing you to add/remove components from the Scene or Stage. -
simulateAction
-
simulateAction
-